<php>
$cancomment = intval(CheckPermission('core_normal','feed_comment'));
$canfeedshare = CheckPermission('core_normal','feed_share');
</php>
<php>foreach($data as $vl){</php>
	<php>$cancomment_old = empty($vl['feed_info']['app_row_id'])  ? 0 : 1;</php>
	<div class="feed_lists clearfix">
	<dl class="feed_list"  id ='feed_top_{$vl['feed_info']['feed_id']}' model-node='feed_list'>
        <dt class="face"> <a href="{$vl['feed_info']['user_info']['space_url']}"><img src="{$vl['feed_info']['user_info']['avatar_small']}"  event-node="face_card" uid='{$vl['feed_info']['user_info']['uid']}'></a></dt>
			<dd class="content"> 
				  <span style="border: 1px solid #D30E00; border-radius: 2px 2px 2px 2px;color: #D30E00;display: inline-block;font-size: 12px;height: 16px;line-height: 16px;margin-right: 3px;overflow: hidden; padding: 0 2px; text-align: center;vertical-align: text-bottom;" class="right">置顶微博</span>
				 <span event-node="show_admin" event-args="feed_id={$vl['feed_info']['feed_id']}&uid={$vl['feed_info']['user_info']['uid']}&feed_del={:CheckPermission('core_admin','feed_del')}&channel_recommend={:CheckPermission('channel_admin','channel_recommend')}" href="javascript:;" class="right f12 f9 hover" style="display:none;cursor:pointer;margin-right:10px;">管理</span>
				 <span class="right f12 f9 hover" style="margin-right:10px;">
				 <a href="javascript:void(0)" onclick="close_feed_top({$vl['feed_info']['feed_id']})"><p title="关闭">X</p></a>
				 </span>
				 <php>if($vl['feed_info']['is_del']==0){</php>
				 <p class="hd">
				  <space uid="vl.feed_info.uid">{uname}</space>
				  <php> if(in_array($vl['feed_info']['user_info']['uid'],$followUids)){</php>
				  {:W('Remark',array('uid'=>$vl['feed_info']['user_info']['uid'],'remark'=>$remarkHash[$vl['feed_info']['user_info']['uid']],'showonly'=>1))}
				  <php>}</php>
				  <php>if(!empty($vl['feed_info']['body'])){</php>
				  <php>}</php>
				</p>
				
				<span class="contents">
							
				{$vl['feed_info']['body']|format=true}</span>
				 <p class="info"> 
					  <span class="right">
					  	{:W('Digg', array('feed_id'=>$vl['feed_info']['feed_id'], 'digg_count'=>$vl['feed_info']['digg_count'], 'diggArr'=>$diggArr))}
					    <i class="vline">|</i>
						  <php>if($vl['feed_info']['actions']['repost']=='true' && $canfeedshare){</php>
						  <php> $sid = !empty($vl['feed_info']['app_row_id'])? $vl['feed_info']['app_row_id'] : $vl['feed_info']['feed_id'];
							$cancomment_old = in_array($vl['feed_info']['type'],$cancomment_old_type) ? 1 : 0;
							</php>
						  {:W('Share',array('sid'=>$sid,'stable'=>$vl['feed_info']['app_row_table'],'initHTML'=>'','current_table'=>'feed','current_id'=>$vl['feed_info']['feed_id'],'nums'=>$vl['feed_info']['repost_count'],'appname'=>$vl['feed_info']['app'],'cancomment'=>$cancomment_old,'feed_type'=>$vl['feed_info']['type'],'is_repost'=>$vl['feed_info']['is_repost']))} <i class="vline">|</i>
						  <php>}</php>

						  <php>if($vl['feed_info']['actions']['favor']== 'true'){</php>
						  {:W('Collection',array('type'=>$type,'sid'=>$vl['feed_info']['feed_id'],'stable'=>'feed','sapp'=>$vl['feed_info']['app']))}
						  <php>}</php>
					
						  <php>if($vl['feed_info']['actions']['comment']== 'true'){</php>
						  <i class="vline">|</i> <a event-node="comment" href="javascript:void(0)" event-args='row_id={$vl['feed_info']['feed_id']}&app_uid={$vl['feed_info']['uid']}&app_row_id={$vl['feed_info']['app_row_id']}&to_comment_id=0&to_uid=0&app_name={$vl['feed_info']['app']}&table=feed&cancomment={$cancomment}&cancomment_old={$cancomment_old}'>{:L('PUBLIC_STREAM_COMMENT')}
						  <php>if($vl['feed_info']['comment_count']!=0){</php>
						  ({$vl['feed_info']['comment_count']})
						  <php>}</php>
						  </a>
						  <php>}</php>
						  </span>
						   <span> <a class="date" date="{$vl['feed_info']['publish_time']}" href="{:U('public/Profile/feed',array('feed_id'=>$vl['feed_info']['feed_id'],'uid'=>$vl['feed_info']['uid']))}">{$vl.feed_info.publish_time|friendlyDate}</a> 
						   <span>{$vl['feed_info']['from']}</span>
						  <em class="hover">
						  <php>if($vl['feed_info']['actions']['delete']== 'true'){</php>
						  <!-- 做普通删除权限 和 管理删除权限 判断 & 只有微博可以被删除  -->
						  <php>if(($vl['feed_info']['user_info']['uid'] == $GLOBALS['ts']['mid'] && CheckPermission('core_normal','feed_del')) || CheckPermission('core_admin','feed_del')){</php>
						  <a href="javascript:void(0)" event-node ='delFeed' event-args='feed_id={$vl['feed_info']['feed_id']}&uid={$vl['feed_info']['user_info']['uid']}'>{:L('PUBLIC_STREAM_DELETE')}</a>
						  <php>}</php>
						  <php>}</php>
						  <php>if($vl['feed_info']['user_info']['uid'] != $GLOBALS['ts']['mid']){</php>
						  <php>if(CheckPermission('core_normal','feed_report')){</php>
						  <a href="javascript:void(0)" event-node='denounce' event-args='aid={$vl['feed_info']['feed_id']}&type=feed&uid={$vl['feed_info']['user_info']['uid']}'>{:L('PUBLIC_STREAM_REPORT')}</a>
						  <php>}</php>
						  <php>}</php>
						  </em> 
					  </span>
				</p>
				<div model-node="comment_detail" class="repeat clearfix" style="display:none;"></div>
				<php>}else{</php>
				<p>{:L('PUBLIC_INFO_ALREADY_DELETE_TIPS')}</p>
				<p class="info">
				  <php>if($vl['feed_info']['actions']['favor']== 'true'){</php>
				  {:W('Collection',array('type'=>$type,'sid'=>$vl['feed_info']['feed_id'],'stable'=>'feed','sapp'=>$vl['feed_info']['app']))}
				  <php>}</php>
				</p>
			    <php>}</php>
       </dd>
   </dl>
</div>	
<php>}</php>
<script type="text/javascript">
function close_feed_top(feed_id){
	$.post("{:Addons::createAddonUrl('FeedTop', 'close_feed_top')}",{feed_id:feed_id},function(txt){
		if(txt==1){
		    $("#feed_top_"+feed_id).fadeOut(1000);
		}else{
			alert('我感冒了，不灵了，请帮我联系管理员吧！');
		}
	});
}
</script>